import Vue from 'vue'
import App from './App.vue'
import ElementUI from 'element-ui'

import Vant from 'vant';
import 'vant/lib/index.css';

Vue.use(Vant);



import 'element-ui/lib/theme-chalk/index.css';
import '@/styles/index.scss' // global css

import Vuex from 'vuex'
import store from './store'
import router from './router'
import { parseTime, resetForm, addDateRange, selectDictLabel, download, handleTree,localDateTimeFormatter } from "@/utils/index";
import { getDicts } from "@/api/system/dict/data";
// 全局方法挂载
Vue.prototype.getDicts = getDicts
Vue.prototype.parseTime = parseTime
Vue.prototype.localDateTimeFormatter = localDateTimeFormatter
Vue.prototype.resetForm = resetForm
Vue.prototype.addDateRange = addDateRange
Vue.prototype.selectDictLabel = selectDictLabel
Vue.prototype.download = download
Vue.prototype.handleTree = handleTree

Vue.prototype.msgSuccess = function (msg) {
  this.$message({ showClose: true, message: msg, type: "success" });
}

Vue.prototype.msgError = function (msg) {
  this.$message({ showClose: true, message: msg, type: "error" });
}

Vue.prototype.msgInfo = function (msg) {
  this.$message.info(msg);
}
import Pagination from "@/components/Pagination";
// 全局组件挂载
Vue.component('Pagination', Pagination)


import './assets/icons' // icon
import './permission' // permission control


import permission from './directive/permission'
Vue.use(permission)



import * as filters from './filters'
Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])
})



Vue.use(ElementUI)
Vue.use(Vuex)
Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App),
}).$mount('#app')
